package ioc.zuoye;

public class Person {
    private String name;
    private Pet pet;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Pet getPet() {
        return pet;
    }

    public void setPet(Pet pet) {
        this.pet = pet;
    }

    public void keepPet() {
        System.out.println(name + "keeps a pet named" + pet + ",because it can say:");
        pet.say();
    }
}
